package leetcode.code1344;

import leetcode.IDebug;
import leetcode.helper.H;

public class Solution implements IDebug {
	public double angleClock(int hour, int minutes) {
		hour %= 12;
		hour *= 30;
		double M = minutes * 6;
		double H = hour + 1d * minutes / 2;
		double ans = Math.abs(H - M);
		return ans > 180 ? 360 - ans : ans;
	}

	@Override
	public void debug4() {
		H.compare(165, this.angleClock(12, 30));
		H.compare(75, this.angleClock(3, 30));
		H.compare(7.5, this.angleClock(3, 15));
		H.compare(155, this.angleClock(4, 50));
		H.compare(0, this.angleClock(12, 0));
		H.compare(76.5, this.angleClock(1, 57));

	}

	@Override
	public void debug3() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug2() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug1() {
		// TODO Auto-generated method stub

	}

	public static void main(String[] args) {
		Solution so = new Solution();
		so.debug1();
		so.debug2();
		so.debug3();
		so.debug4();

	}

}
